import http from '../request'

export const queryCart = (data) => http({ url: '/cart', data })

/** 添加购物车 */
export const saveCart = (data) => http({ url: '/cart', method: 'POST', data })

/* 修改数量 */
export const editCart = (id, num) =>
    http({ url: '/cart/' + id, method: 'PUT', data: { num } })
    /* 删除购物车商品 */
export const deleteCart = (data) =>
    http({ url: '/cart/', method: 'DELETE', data })
